<template>
	<view class="content">
	 
	     	  <div class="box" @click="fn(item.lottery_id)" v-for="(item,index) in list" :key="index">
				  <image class="box-ssq" src="../../static/images/ssq.png" mode=""></image>
				  <div class="text">
				  	<text class="lie">{{item.lottery_name}}</text>
				  	<text class="ssq-color">{{item.remarks}}</text>
				  </div>
 			  </div>
	  
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				list:[]
			}
		},
		onLoad() {
		   uni.request({
		   	url:"http://api.aslegou.top/api/cptypelist",
			success: (res) => {
				// console.log(res);
				this.list=res.data.list
				console.log(res);
			}
		   })	

		},
		methods: {
			fn(id){
				uni.navigateTo({
					url:"/pages/compontes/new?id="+id
				})
			}
		}
	}
</script>

<style>
	.content {
		 height: 100%;
		
		 background-color: #fe5f7d;
	}
	.box{
		height: 100px;
		background-color: #fff;
		display: flex;
		align-items: center;
		margin: 0 10px;
		border-radius: 7px;
		margin-bottom: 10px;
	}
   .box-ssq{
	   width: 50px;
	   height: 50px;
	   padding: 0 10px; 
   }
   .lie{
	    font-weight: 900;
		
   }
   .text{
	 display: flex;
	 flex-direction: column;
   }
   .ssq-color{
	   color: #ccc;
	   margin-top: 10px;
   }
 
</style>
